# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Content.V21.Model.AccountAutomaticImprovements do
  @moduledoc """
  The automatic improvements of the account can be used to automatically update items, improve images and shipping.

  ## Attributes

  *   `imageImprovements` (*type:* `GoogleApi.Content.V21.Model.AccountImageImprovements.t`, *default:* `nil`) - This improvement will attempt to automatically correct submitted images if they don't meet the [image requirements](https://support.google.com/merchants/answer/6324350), for example, removing overlays. If successful, the image will be replaced and approved. This improvement is only applied to images of disapproved offers. For more information see: [Automatic image improvements](https://support.google.com/merchants/answer/9242973) This field is only updated (cleared) if provided.
  *   `itemUpdates` (*type:* `GoogleApi.Content.V21.Model.AccountItemUpdates.t`, *default:* `nil`) - Turning on [item updates](https://support.google.com/merchants/answer/3246284) allows Google to automatically update items for you. When item updates are on, Google uses the structured data markup on the website and advanced data extractors to update the price and availability of the items. When the item updates are off, items with mismatched data aren't shown. This field is only updated (cleared) if provided.
  *   `shippingImprovements` (*type:* `GoogleApi.Content.V21.Model.AccountShippingImprovements.t`, *default:* `nil`) - Not available for MCAs [accounts](https://support.google.com/merchants/answer/188487). By turning on [automatic shipping improvements](https://support.google.com/merchants/answer/10027038), you are allowing Google to improve the accuracy of your delivery times shown to shoppers using Google. More accurate delivery times, especially when faster, typically lead to better conversion rates. Google will improve your estimated delivery times based on various factors: - Delivery address of an order - Current handling time and shipping time settings - Estimated weekdays or business days - Parcel tracking data This field is only updated (cleared) if provided.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :imageImprovements => GoogleApi.Content.V21.Model.AccountImageImprovements.t() | nil,
          :itemUpdates => GoogleApi.Content.V21.Model.AccountItemUpdates.t() | nil,
          :shippingImprovements =>
            GoogleApi.Content.V21.Model.AccountShippingImprovements.t() | nil
        }

  field(:imageImprovements, as: GoogleApi.Content.V21.Model.AccountImageImprovements)
  field(:itemUpdates, as: GoogleApi.Content.V21.Model.AccountItemUpdates)
  field(:shippingImprovements, as: GoogleApi.Content.V21.Model.AccountShippingImprovements)
end

defimpl Poison.Decoder, for: GoogleApi.Content.V21.Model.AccountAutomaticImprovements do
  def decode(value, options) do
    GoogleApi.Content.V21.Model.AccountAutomaticImprovements.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Content.V21.Model.AccountAutomaticImprovements do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
